#ifndef KMYMACRODICT_H
#define KMYMACRODICT_H

#include <map>
#include <string>
using namespace std;
#include "KmyScriptAnchor.h"
#include "KmyScript.h"

/**
  * 指令词典
  */
class KmyMacroDict
{
public:
    KmyMacroDict();
    ~KmyMacroDict();

    void finalize();

    void initialize(KmyScript* macro_script);

    KmyScriptAnchor* getScriptAddr(const string &macro_name);

private:
    KmyScriptAnchor* putScriptAddr(KmyScriptAnchor* sa);
    KmyScriptAnchor* removeScriptAddr(const string &macro_name);
    map<string, KmyScriptAnchor*> macro_map;

};

#endif // KMYFUNCDICT_H
